package controller.command;

import model.displayer.ShapeDisplayer;

public class ShapeExpandCmd extends CommandJFxImpl
{
    double multi;

    ShapeExpandCmd(ShapeDisplayer shape,double multi)
    {
        super(shape);
        this.multi = multi;
    }

    @Override
    public void execute()
    {
        shape.expand(multi);
    }

    @Override
    public void cancel()
    {
        double shrinkMulti = 1 - (1/ ( 1 + multi ));
        shape.shrink(shrinkMulti);
    }
}
